package com.fz.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fz.core.BaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 收藏表
 * </p>
 *
 * @author fz
 * @since 2024-08-28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Collect extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 商品图片
     */
    private String goodsImg;

    /**
     * 商品id
     */
    private Long goodsId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 收藏时间
     */
    private LocalDateTime createTime;

    private Long categoryId;

    @TableField(exist = false)
    private BigDecimal price;

    public Collect(String name, String imgs, Long goodsId, Long userId, LocalDateTime now, Long categoryId) {
        this.goodsName = name;
        this.goodsImg = imgs;
        this.goodsId = goodsId;
        this.userId = userId;
        this.createTime = now;
        this.categoryId = categoryId;
    }
}
